<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-08-28 16:21:26
 * @LastEditTime: 2019-12-17 19:36:20
 * @LastEditors: Please set LastEditors
 -->
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/vant.css">
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <script type="text/javascript" src="../../script/jquery.js"></script>
    <script type="text/javascript" src="../../script/layer/mobile/layer.js"></script>
    <script type="text/javascript" src="../../script/vue.min.js"></script>
    <script type="text/javascript" src="../../script/vant.min.js"></script>
    <script type="text/javascript" src="../../script/fastclick.js"></script>
    <script type="text/javascript" src="../../script/base.js"></script>
    <style type="text/css">
        .head {
            background: #ededed;
        }

        .van-nav-bar .van-icon {
            color: #000;
        }

        .van-nav-bar__title {
            color: #000;
            font-weight: 700;
        }

        .content {
            background: #fff !important;
        }

        .ul,
        li {
            padding: 0;
            margin: 0;
            list-style: none;
            display: block;
        }

        /* li:active {
            background: #e2e2e2;
        } */

        .row {
            position: relative;
        }

        .header {
            width: 55px;
            height: 55px;
            padding: 10px;
        }

        .header img {
            width: 100%;
            height: 100%;
            border-radius: 4px;
            overflow: hidden;
        }

        .label {
            position: absolute;
            top: 0;
            left: 55px;
            right: 0;
            height: 55px;
            border-bottom: 1px solid #efefef;
            padding: 10px 0;
        }

        .label .name {
            line-height: 34px;
            font-size: 16px;
            padding-right: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            position: relative;
        }

        .label .name .time {
            position: absolute;
            top: 0;
            right: 0;
            padding-right: 15px;
            line-height: 26px;
            font-size: 12px;
            color: #a2a2a2;
        }

        .label .text {
            line-height: 19px;
            font-size: 14px;
            color: #a2a2a2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding-right: 15px;
        }

        .b {
            height: 10px;
            background: #ededed;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="init-full">
            <van-nav-bar class="head" title="群聊列表" left-arrow @click-left="onClickLeft">
                
            </van-nav-bar>
            <div class="body-no-bottom">
                <div class="content">
                    <div>
                        <ul>
                            <li v-for="(row,index) in groupList" @click="intoDetail(row,index)">
                                <div class="row">
                                    <div class="header">
                                        <img src="../../image/ql.png" />
                                    </div>
                                    <div class="label">
                                        <div class="name">{{row.groupname}}</div>
                                        <!-- <div class="text">{{row.sign}}</div> -->
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <van-loading v-if="showLoading" />
            </div>
        </div>
    </div>
</body>

<script type="text/javascript">
    var vm;
    apiready = function () {

        var groupList = api.pageParam.groupList;

        vm = new Vue({
            el: '#app',
            data: {
                showLoading: false,
                groupList: groupList
            },
            created: function () {
                var that = this;
            },
            methods: {
                intoDetail(row, index) {
                    var that = this;
                    row.type = 'group';
                    api.openWin({
                        name: 'chatListDetail',
                        url: 'chatListDetail.html',
                        reload: true,
                        slidBackEnabled: false,
                        pageParam: {
                            row: row
                        }
                    })

                },
                onClickLeft() {
                    api.closeWin();
                }
            }
        })
    }
</script>

</html>